home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / cross / sasmv14.dms / sasmv14.adf / manual.readme < prev    next >
Text File  |  1993-05-22  |  27KB  |  679 lines

  1.  
  2.        SASM    QuickManual    © 1993 by Infernal Byte Systems, INC.
  3.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4.  
  5.                 < Welcome to the prelimary SASM V1.4 doxs >
  6.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7.  
  8. WHAT'S NEW ?
  9. ------------
  10.  
  11. - Lots (!!!) of bugs removed.
  12.  
  13.     - Can't imagine that it worked before...
  14.     - Only stupid kids swap lea 4(a5),a0 with move.l 4(a5),a0 but it worked ?!?
  15.  
  16. - Some includes added and updated.
  17.  
  18. - RESETHANDLER added. Now you're NOT forced to switch your Super
  19.   Famicom/Nintendo On/Off/On every new run anymore. You don't even
  20.   have to press the Reset button on it. Simple assemble with the
  21.   resethandler.i include file at the beginning of your code and create a 
  22.   little wire from Amiga<>SNES.
  23.  
  24. - Lot's of errors from the snes doxs removed.
  25.  
  26. - Anybody an idea about the CMA instruction mentioned in the
  27.   Western Digital documents ?? Some other guys also create CPA but that
  28.   is not mentioned in the Western Digital documentation.
  29.  
  30. - Extensive Error Message Handling. Just over one hundert different error
  31.   and warning messages for clear reports. Not just 'RELATIVE MODE ERROR'
  32.   like some others.... :)
  33.  
  34. - Speed improved.
  35.  
  36.  
  37. DISCLAIMER
  38. ----------
  39.  
  40. This software package is shareware.  When you find it usfull and you're
  41. working with it a lot, please feel free to send $50.00 to the authors
  42. address.  You will then get free updates, a full version of SASM (including
  43. SPC700 assembly and a MC68000 version...) and a well done, binded TeX
  44. manual.  So don't be a foul and register.  You'll find a registeration
  45. sheet on the disk in the 'order' directory.
  46.  
  47. Since no programming author can guarantee that his software package is bug
  48. free, you'll use this software package on your own risk.  The authors are
  49. not responsible in any form for anything that will happen during the use of
  50. SASM.  But overall we can say the product runs stable, it's deeply debugged
  51. and tested.  If you find any kind of bug, we would be pleased if you send
  52. us a bugreport in.  You'll find a bugreport sheet also on this disk, again
  53. in the 'order' directory. Please attach sample sourcecode to reproduce the
  54. bug. Every person who'll send a real bug, will be get some piece of my SNES
  55. sourcecodes, just to make sure that i will receive the bug reports.
  56.  
  57.  Florian W. Sauer
  58.  Hachumerstr. 48
  59.  3205 Bockenem 1
  60.       Germany        <- thats the answer to bad english spelling :)
  61.  
  62.  
  63. WHAT IS SASM ?
  64. --------------
  65.  
  66. This one-pass assembler is designed to create really cool games running on
  67. the S-NES system using the SuperMagicom or similar hardware.  A lot of
  68. commands have been installed to make live much easier.  This is a cool
  69. piece of software, its for cool dudes only, supporting includes, macros,
  70. conditional assembly and much more.  Also it uses latest software
  71. technologies for top speed analyzing and creating code (yep, up to six
  72. times faster than FAsm v0.52 using 3 MBYTE of rts).
  73.  
  74. Being more serious guys, saying that SASM is a conditional macro assembler,
  75. which supports full WD65C816 command set, unlimited length of symbols,
  76. unlimited number of symbols, unlimited sourcesize.  Also it supports macro
  77. processing being a macro-assembler, nestable include-file handling
  78. (nestable up to 128 times), re-definable symbols, an interface via AREXX to
  79. the CygnusEditor or similar, locally definable labels, SNES register help
  80. pages, WD65C816 help pages, high-level-language like statements, relative
  81. equations, userfriendly error messages, repeat statements, operator
  82. precedence expression pharsing and (of course) speed.  Overall SASM is able
  83. to assemble upto 30.000 lines per second, however the LPS rate grows like
  84. the size of the sourcefile grows.  So SASM is much faster than anything
  85. else known by the authors.  The assembler is designed to work with the
  86. Super Magicom hardware or something similar.  Sending tools are included in
  87. the package, ripped from the pirate scene, hope you don't mind, they are
  88. great!  Also a hardware debugger is avaible in the near future for the
  89. Amiga series of computers.
  90.  
  91. Additional examples, sourcefiles, bonusprograms and tools are on the disk,
  92. just try them out.  Later in the manual the text refers to them.
  93.  
  94.  
  95. INSTALLATION & REQUIERMENTS
  96. ---------------------------
  97.  
  98. You only will find the MC68030 version of the assembler on this disk.  To
  99. get a MC68000 version, please register and send your comments to the above
  100. address.  Also the MC68000 version is not as hungry as the '030 version is,
  101. since it needs about one meg less.  We strongly recommend to use the
  102. MC68030 version of the assembler, since it is lots faster and anyone who
  103. has enough memory to run SASM, has also a big motorola in his Amiga.  The
  104. author uses an Amiga 3000 with ten megabytes of RAM running at 25MHZ, which
  105. is pretty nippy.  Also the MC68000 uses dump-hashing which is NOT as
  106. effective as the hashing method used in the MC68030 version.
  107.  
  108. SASM's speed requiers lots of memory.  For all hashtables and lists the
  109. assembler needs overall 1.2 megabytes of memory.  So a minimum of two
  110. megabytes have to be installed in your Amiga to assemble something.
  111. Therefore you will really get fast output.  Compare to anything else you
  112. know.  Don't get confused when you assemble small files and the statistic
  113. reports low LPS rates.  The assembler needs big sourcefiles to be fast.
  114. The bottleneck of assembly is IO.  Please ensure that this bottleneck is as
  115. wide as possible, only assembling on a SCSI controlled harddrive and not on
  116. floppy disk.  If you havn't got a fast harddrive, we suggest to copy your
  117. sourcefiles into RAM and assemble in the ramdisk.  The floppy is toooo
  118. slow.
  119.  
  120. So, now you know 8 megabyte RAM and a MC68030 will do best, but which
  121. software do you need to work with SASM?  Well, anything you will need is
  122. included on this disk.  Please install first a copy of SASM into your c:
  123. directory, next copy the AREXX script files into your REXX:  directory.  To
  124. link SASM with the CygnusEd, simply install the 'sasmrexx.ced' script file
  125. into your CygnusEd and create a macro which saves the current buffers first
  126. and involks the rexx-script afterwards.  The script will assemble your file
  127. and link the errormessages to the CygnusEd.  The only thing missing now is
  128. a '.project' file, which says to AREXX what file to work with.  The
  129. .project file is like:
  130.  
  131. snes:demo2/megasource.s
  132. send
  133.  
  134. The first line is the full path of your current working file.  If the
  135. second line reads 'send', your executable SMC file is directly sended to
  136. the Super Magicom after successfull assembly.  If there is just a blank
  137. line, nothing happens after assembly, but returning to CygnusEd.
  138.  
  139. To start editing your current project, simply type 'Rx edit' or only
  140. 'edit', if you are using something like CSH V5.17 or so.  By the way, SASM
  141. needs kickstart 2.04 or higher to work.  Yep, I know, lots of things we
  142. need, but why shouldn't i use it, when my A3000 supports them?
  143.  
  144. If you want to use the SEND/S option via the commandline, please install
  145. 'smc13' into your c: directory with the filename unchanged. 
  146.  
  147.  
  148. HOW DOES IT WORK?
  149. -----------------
  150.  
  151. Good question!  Some time ago, i had to ask myself, how can i realize a
  152. good and quick assembler in MC68030, not being to difficult to code and
  153. debug.  After reading lots of books, i knew the basic ways.  Assembling on
  154. Amiga is quite simple, when you have enough memory.  I suppose it is like
  155. hell, porting this goodie to a PC.  Never mind, after reading the complete
  156. sourcefile into memory, we will directly start to assemble in one pass.
  157. That means that all sucking forward references have to be chained and
  158. processed later on.  So don't get confused if some of your first lines of
  159. code will read like the following:
  160.  
  161. start:    exp= codesize*4
  162.  
  163. Where codesize is defined at the end of your sourcecode.  The 'exp=' pseudo
  164. opcode will just evaluate the following expression and print the result to
  165. the console.  Implemented only for debugging and found usfull.  But whats
  166. the problem?  It is easy, don't suppose the expression result is the first
  167. thing printed to the console, since codesize is a forward reference.  So
  168. the line is resolved at the end and consequently the result is printout
  169. near to the end of assembly.  Got it?
  170.  
  171. Too avoid long assembly delays everything which need to be expanded from
  172. orginal sourcecode to whatever longer (like macros and local symbols), is
  173. stored outside of the orginal memory buffer.  That increases memory usage!
  174. Don't forget it, when using lots of macros and local symbols.
  175.  
  176.  
  177. WARNINGS & ERROR MESSAGES
  178. -------------------------
  179.  
  180. Lets avoid them!  This nagging bastards will try to help you getting your
  181. code running.  So there are four types of errors/warnings.  The first one
  182. DOSERROR is just an errormessage from AmigaDOS, god knows what went wrong.
  183. The second, called WARNINGS are slightly more to notice.  Something went
  184. wrong, but that was not a reason to abort assembly.  Don't throw'em away,
  185. since it is to suppose you made an error!  (Most of the time).  You are
  186. able to suspress warnings by adding 'NOWARN' to the commandline.  Anyway,
  187. when you do so, a coloured message will be print to console-output, if
  188. there were warnings, since it is no good, really forget them all.  Next
  189. topic, the ASSEMBLY errors.  Something serious has happen and needs cure.
  190. Remember that, some small error will result in heavy error message, just
  191. look only on the first and keep cool.  The last type of errormessage is
  192. called:  RESOLVE.  This will come up, if an error is found during resolving
  193. the sucking forward references.  Most of the time, it's a undefined symbol
  194. or something like that.  Easy going.  Cure it and go!  A little help is
  195. included when working with include files.  The current filename is printed
  196. at the top of the errormessage appended by the current nest deep in decimal
  197. number (just for showbiz).
  198.  
  199. Note that SASM is strictly producing warnings when he/she expects 8 or 16
  200. or 24 bit data and you give him/her more bits... You can ignore most of those
  201. warnings when you just initalize pointers with '<','>','^'....
  202.  
  203.  
  204. CALCULATIONS
  205. ------------
  206.  
  207. Just to say, that all calculations done during assembly are signed 32-bit,
  208. so don't get confused.
  209.  
  210. Valid operators are:
  211.  
  212.     ||    :    bit OR
  213.     &&    :    bit AND
  214.     +    :    addition
  215.     -    :    subtraction (also leading - for negative numbers)
  216.     *    :    multiply
  217.     /    :    divide
  218.     ^    :    power of
  219.     <<    :    shift left
  220.     >>    :    shift right
  221.     ()    :    brackets
  222.  
  223. They are listed in pri order.  That means || has the lowest pri.  Note:
  224. This piece of code does NOT evaluate expressions like the Seka does.  It
  225. uses expression precendence pharsing to act like it should do, so 2+3*2
  226. will be eight, not (like seka does) ten.
  227.  
  228.  
  229. ACCU AND INDEX REGISTER SIZE TRACKING
  230. -------------------------------------
  231.  
  232. Normally, the size of this both is initialized by 8 bit at the beginning
  233. of assembly. Than all REP/SEP's are scanned and the assembler recognizes
  234. them getting to know what to do. 
  235.  
  236. Problem: So SASM recognizes my REP/SEP instructions, but what should SASM
  237. ~~~~~~~     do with 'PLP' instructions, since they also may change register
  238.          size ?
  239.  
  240. Answer:  SASM does nothing. You have to use the MODE command to track your
  241. ~~~~~~   work. Remember MODE does NOT create any code!
  242.  
  243. Warning: One of the mostly done errors in your code WILL BE WRONG register
  244. ~~~~~~~  size at run time matching with bad code. I.e. running all in 8 bit
  245.          but SASM has generated 16 bit code. Refer good books about WD65C816
  246.      assembly language.
  247.  
  248. Hints:     - Verify size after interrupt and subroutines.
  249. ~~~~~     - At start all regs are eight bit.
  250.      - Read the instrucions about the MODE command.
  251.      - Read WD65C816 documentation about REP/SEP, index & accu sizes.
  252.  
  253. Example: All your code uses 16 bits accu, but the VBI, it uses 8 bit ACCU.
  254. ~~~~~~~
  255.      Following code:
  256.          ~~~~~~~~~~~~~~
  257.      <main routine> (16 bit) [call some subroutine in 16 bit mode]
  258.         .
  259.         .
  260.      <VBI routine>  (here we switch to 8 bits)
  261.         .
  262.         .
  263.      <sub routines> (here we forget to switch back to 16 bits, using
  264.              MODE A16, since we don't need a REP, since during run-
  265.              time we are just in 16 bits, since we have been called
  266.              from <main routine>, but SASM generates 8 bit code,
  267.              since SASM can't better know.)
  268.  
  269.  
  270.      So the resolve of all this is:
  271.          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  272.      <main routine> (16 bit) [call some subroutine in 16 bit mode]
  273.         .
  274.         .
  275.      <VBI routine>  (here we switch to 8 bits)
  276.         .
  277.         .
  278.      MODE A16X16    (this makes the world ok!)
  279.      <sub routines> (16 bit runtime, 16 bit generated.)
  280.  
  281.  
  282.  
  283. What we know now: Don't get confused. This ain't no M68000 anymore...
  284. ~~~~~~~~~~~~~~~~  [& read the SPC700 dox' to get moreover confused... :)]
  285.  
  286.  
  287. WESTERN DIGITAL SYNTAX
  288. ----------------------
  289.  
  290. Fully supported. That means:
  291.  
  292.     after # a '<' will do nothing. (Getting LSB)
  293.         a '>' will shift to the right by 8 bits. (Getting Middle SB)
  294.         a '^' will shift to the right by 16 bits. (Getting MSB)
  295.  
  296.     And using ABSOLUTE ADDRESSING:
  297.  
  298.         a '<' forces to 8 bits.
  299.         a '!' or '|' forces to 16 bit. (also default in forward references)
  300.         a '>' forces to 24 bits.
  301.  
  302. Thats nearly silly and for hell needed.  The syntax is not defined by me,
  303. but the Western Digital.  Refer to:  ISBN 0-07-881235-6
  304.  
  305. The suggested alternative mnemonics are included aswell. Anyway, i have no idea
  306. to handle with CMA, it should be an abbrev. for 'CMP A', but this one is really
  307. wrecked.
  308.  
  309.  
  310. LOCAL SYMBOLS
  311. -------------
  312.  
  313. SASM supports local symbols to be used either in macro expanding and/or in
  314. normal sourcecode.  A local symbol has it is 'known' range between two
  315. normal label definitions and/or macro calls.  That means:
  316.  
  317. MyRoutine:
  318.     clc
  319.     bra    .skip
  320.     dc.b    0,0,0,0
  321. .skip    nop
  322.  
  323. will work, but
  324.  
  325. MyRoutine2:
  326.     clc
  327.     bra    .skip
  328.     dc.b    0,0,0,0
  329.     CLR_ALL_REGS            ;call a macro
  330. .skip    nop
  331.  
  332. will not work, since a macro is called between definition and reference of the
  333. local symbol. Also
  334.  
  335. MyRoutine3:
  336.     bra    .skip
  337.     dc.b    0,0,0
  338. .skip:    nop
  339. MyRoutine4:
  340.     bra    .skip
  341.     dc.b    0,0,0
  342. .skip:    rts
  343.  
  344. will just work fine... Good'un! Please note that local symbols are internally
  345. handled like: 'lll_<8 digits #><name>', so please do NOT use any symbols starting
  346. with 'lll_', since this may cause confusion to SASM.
  347.  
  348.  
  349. KNOWN BUGS
  350. ----------
  351.  
  352. Yep, there are some, but they are fixed in the full version, just for me to
  353. get some money!  :)
  354.  
  355. - MACRO calls, MACRO definition and Conditional Assembly MUST NOT start at
  356.   lines with local labels in. That will cause a crash. Simply use a complete
  357.   line for a locallabel with no other information.
  358.  
  359. - LIST Option included only in the full version.
  360.  
  361.  
  362. MORE TO SAY ????
  363. ----------------
  364.  
  365. Okey dokey, not more to say. Look at the examples and try it out. When you
  366. want a more complete package, including SNES demo sources, than register.
  367.  
  368.  
  369. WHAT WILL HAPPEN IN THE FUTURE ?
  370. --------------------------------
  371.  
  372. Some improvments have to be done and, i guess, lots of debugging.  Also we
  373. are just developing a hardware debugger for the SNES/AMIGA.  So send in
  374. bugreports.  With sources s.v.p.  SPC700 assembly will be included to
  375. persons who register, when enough people will register...
  376.  
  377.  
  378. GREETINGS
  379. ---------
  380.  
  381.     Hi DAX, thanks for all your help. Your 3rd demo is quite nice. And you
  382.     words about the SNES scene: *HOW TRUE*
  383.  
  384.     Hi Mystic Brain, good luck, hacking PC.
  385.  
  386.     Hi Aragon, did you forgot the 'SEND GAME DATA' option, or i am just too
  387.     lazy?
  388.  
  389.     Hi HBT and MR.MADNESS: Give me a call to discuss on assembler programming.
  390.  
  391.     Hi Starr of Quartex: Hope you don't mind me including SMC13. Its the
  392.     fastest sending tool on Amiga i know.
  393.  
  394.     Mr.Soundwave: Keep easy going.
  395.  
  396.  
  397. LIST OF PSEUDO OPCODES
  398. ----------------------
  399.  
  400. Here's the complete list of all pseudo opcodes that SASM will understand.
  401. If you have any more ideas, please let us know.  At the moment there are 42
  402. valid opcodes.  Make sure that you read the HEAP command syntax.  It's the
  403. first and last and always pseudo opcode.
  404.  
  405.  
  406. Valid pseudoopcodes are:
  407. ~~~~~~~~~~~~~~~~~~~~~~~~
  408.  
  409. DC.x        where x is one of [b] for byte
  410. ~~~~                  [w] for word
  411.                   [t] for triple (three bytes for 65816)
  412.                   [l] for longword (as on 68000)
  413.  
  414.         stores information in the objectcode. Bytes are all placed
  415.         like MC68000 format. MSB first LSB last.
  416.  
  417.         [NOTE: Some other assemblers will handle this in another way!]
  418. ------------------------------------------------------------------------------
  419.  
  420. DCR.x        where x is one of [b] for byte
  421. ~~~~~                  [w] for word
  422.                   [t] for triple (three bytes for 65816)
  423.                   [l] for longword (as on 68000)
  424.  
  425.         stores information in the objectcode. Bytes are all placed
  426.         like INTEL format. LSB first MSB last. To store 65C816 pointers
  427.         please use DCR.W or DCR.T.
  428.  
  429.         [NOTE: Some other assemblers will handle this in another way!]
  430. ------------------------------------------------------------------------------
  431.  
  432. EQU        assigns a constant value to a symbol. Symbol must NOT have
  433. ~~~        a colon (:) appended at the end. A symbol defined in this
  434.         way is NOT re-definable.
  435. ------------------------------------------------------------------------------
  436.  
  437. =        same as EQU.
  438. ~
  439. ------------------------------------------------------------------------------
  440.  
  441. RSRESET        resets the internal structure counter. See examples for
  442. ~~~~~~~        more information.
  443. ------------------------------------------------------------------------------
  444.  
  445. RS=        sets the internal structure counter to a constant value.
  446. ~~~        See examples for more information.
  447. ------------------------------------------------------------------------------
  448.  
  449. RS.x        assigns the internal structure counter to a symbol and advances
  450. ~~~~        the internal structure counter. See examples for more information.
  451. ------------------------------------------------------------------------------
  452.  
  453. DS.x <SIZ>,<V>    creates a block of <SIZ> times a '.x' initialized with <V>.
  454. ~~~~~~~~~~~~~~    So DS.L 10,0 will create ten longwords of zero. Motorola
  455.         storage format is used. If you're more familar with the SEKA
  456.         syntax blk.x <size>,<value> please define a macro!
  457.  
  458.         [NOTE: Some other assemblers will handle this in another way!]
  459. ------------------------------------------------------------------------------
  460.  
  461. DSR.x <SIZ>,<V>    creates a block of <SIZ> times a '.x' initialized with <V>.
  462. ~~~~~~~~~~~~~~~    So DS.L 10,0 will create ten longwords of zero. Intel storage
  463.         format is used. If you're more familar with the SEKA syntax
  464.         blk[r].x <size>,<value> please define a macro!
  465.         format is used.
  466.  
  467.         [NOTE: Some other assemblers will handle this in another way!]
  468. ------------------------------------------------------------------------------
  469.  
  470. SET        assigns a constant value to a symbol. The symbol is able to be
  471. ~~~        redefined later on. So:
  472.  
  473.         jackson    set 25
  474.         jackson set jackson^2
  475.  
  476.         just works great. You can use this to create default empty
  477.         OAM tables or even HDMA-window animations... (see examples)
  478. ------------------------------------------------------------------------------
  479.  
  480. IFD        continues assembly upto next matching ELSE or ENDC only if the
  481. ~~~        following symbol is defined at assembly time. (Note a forward
  482.         reference means NOT DEFINED).
  483. ------------------------------------------------------------------------------
  484.  
  485. IFND        continues assembly till next ELSE or ENDC only if the following
  486. ~~~~        symbol is not defined or a forward reference at assembly time.
  487. ------------------------------------------------------------------------------
  488.  
  489. IF        continues assembly till next ELSE or ENDC only if the following
  490. ~~        expression returns TRUE. Valid terminals are:
  491.  
  492.         = - equal
  493.         # - unequal
  494.         < - less than
  495.         > - greater than
  496.  
  497.         For all calculations signed 32bit arithmetic is used.
  498. ------------------------------------------------------------------------------
  499.  
  500. ELSE        inverses the last result of an IF statement and continues or
  501. ~~~~        dis-continues assembly till next ENDC.
  502. ------------------------------------------------------------------------------
  503.  
  504. ENDC        ends conditional assembly.
  505. ~~~~
  506. ------------------------------------------------------------------------------
  507.  
  508. .REPEAT        enables repetitive code generation.
  509. ~~~~~~~
  510.         .repeat n {
  511.         (....)
  512.         }
  513.  
  514.         The code in brackets will be generated 'n' times. Please 
  515.         remind 'n=0' will stop assembly with an errormessage. Since
  516.         i was to lame to solve the block structure. May be in the 
  517.         future and when you request it from me and when at least
  518.         some people register, i'll include such goodies as FOR,
  519.         WHILE, UNTIL, LOOP and so on... lets see...
  520. ------------------------------------------------------------------------------
  521.  
  522. }        ends a block structured command.
  523. ~
  524. ------------------------------------------------------------------------------
  525.  
  526. MACRO        defines a MACRO definition. Parameters are allowed form
  527. ~~~~~        \1 upto \9. Parameters are textual replaced during macro
  528.         expansion. Call be name. Compiler builders love that. Anyway
  529.         we don't expand at runtime. Macro CALLS may be nested upto 128
  530.         times, however macro DEFINITIONS may NOT be nested. Also you
  531.         can generally use local labels and symbols by just adding
  532.         a '.' at the start of the labelname using a local symbol.
  533. ------------------------------------------------------------------------------
  534.  
  535. ENDM        ends a macro definition.
  536. ~~~~
  537. ------------------------------------------------------------------------------
  538.  
  539. MODE        will FORCE current MEMORY and/or INDEX sizes. Beware! Normally
  540. ~~~~        the code will generated as your rep&seps will say. So don't set
  541.         up the MEMORY and/or INDEX sizes by plp. If you do so, keep track
  542.         with MODE.
  543.  
  544.         Warning: This pseudo opcode will not generate any code !!!
  545.         ~~~~~~~
  546.         MODE A16X16 or A8X8 or A16X8 or A8X16 will do.
  547. ------------------------------------------------------------------------------
  548.  
  549. MEXIT        during macro expansion, MEXIT will leave the current macro being
  550. ~~~~~        expanded. Usfull when using conditional assembly.
  551. ------------------------------------------------------------------------------
  552.  
  553. .BIN        includes a binary file to the current objectposition. The
  554. ~~~~        current PC pointer is advanced in order to the length of the
  555.         binary file, both in LROM and in HROM mode. 
  556.         Note: A 64k binary file will advance the PC by 64k in HROM mode
  557.               and by 128k in LROM mode.
  558. ------------------------------------------------------------------------------
  559.  
  560. .INCLUDE    includes sourcecode. Includes may be nested upto 128 times.
  561. ~~~~~~~~
  562. ------------------------------------------------------------------------------
  563.  
  564. .PAD        skips objectcode upto the next start of a bank. Blank area is
  565. ~~~~        filled with zero.
  566. ------------------------------------------------------------------------------
  567.  
  568. .SAY        just simply prints the rest of the line to stout.
  569. ~~~~        '.say !' prints only a <CR>.
  570. ------------------------------------------------------------------------------
  571.  
  572. .ASK        dumps usfull or not usfull data to stout.
  573. ~~~~
  574. ------------------------------------------------------------------------------
  575.  
  576. EXP=        evaluates the expression following the '=' and prints the
  577. ~~~~        result to stout.
  578. ------------------------------------------------------------------------------
  579.  
  580. *=        sets the current PC. Same as 'ORG'.
  581. ~~
  582. ------------------------------------------------------------------------------
  583.  
  584. ORG        sets the current PC. Same as '*='.
  585. ~~~
  586. ------------------------------------------------------------------------------
  587.  
  588. EVEN        aligns code on a word boundary. However, the WD65C816 does not
  589. ~~~~        expect your code word align'd like MC68000.
  590. ------------------------------------------------------------------------------
  591.  
  592. ODD        aligns code on a (word+1) boundary.
  593. ~~~
  594. ------------------------------------------------------------------------------
  595.  
  596. HEAP        defines maximum objectsize. MUST be the first command in your
  597. ~~~~        sourcecode, since HEAP also initializes lots of internal assembly
  598.         structures and hash tables.
  599.  
  600.         HEAP O=1000 will allocate 1000 bytes
  601.         HEAP O=1000k will allocate 1000 kbytes
  602.         HEAP O=1000m will allocate 1000 mbytes
  603.  
  604.         Don't forget: MUST be in your sourcecode.
  605. ------------------------------------------------------------------------------
  606.  
  607. LROM        setup SASM to generate 32k banked code. This is the default
  608. ~~~~        setting.
  609. ------------------------------------------------------------------------------
  610.  
  611. HROM        setup SASM to generate continous code. Like all those HI-ROM
  612. ~~~~        games use.
  613. ------------------------------------------------------------------------------
  614.  
  615. SYM+        enable dump of symboltable at the end of assembly. The 
  616. ~~~~        dump could be interrupted vice versa CTRL-C.
  617. ------------------------------------------------------------------------------
  618.  
  619. SMC+        tell SASM to append a SuperMagicom or similar header. Works only
  620. ~~~~        if inital PC is $8000.
  621. ------------------------------------------------------------------------------
  622.  
  623. TEXT        create TEXT as SNES SC data for direct load into VRAM of SNES.
  624. ~~~~        Usage is: TEXT attrbyte,"abcdef..", where attrbyte will be
  625.         the highbyte of all textbytes. Also <20H> is subtracted from
  626.         each character. SC information is stored <HIGH,LOW,HIGH,LOW...>
  627. ------------------------------------------------------------------------------
  628.  
  629. BASE <n>    Assembles like PC set to <n>, but stores code at current
  630. ~~~~        position. BASE should be used only at the beginning of a new
  631.         bank, i could be done anywhere, but human mind can't follow
  632.         those strange things...
  633.         Usfull if you write routines, which have to run may be in WRAM
  634.         and which have to be copied by your code into other locations.
  635.  
  636.         Example:
  637.             org $28000
  638.             base $1000
  639.  
  640.         loop    clc
  641.             inx
  642.             jmp    loop
  643.  
  644.         The code will be assembled with loop=$1000. So this piece of
  645.         assembly is only able to be executed when it's been copied down
  646.         to $1000 in WRAM (from location $28000).
  647. ------------------------------------------------------------------------------
  648.  
  649. DBUG        tell SuperMagicom to enable 'GO-BACK' mode. Works only with
  650. ~~~~        SMC+ (needs header). Also a 'RESET-PULSE' will be send just
  651.         before sending the executable via POT1X in POTGO. (A $3000 is
  652.         written there pulling pin 5 of Gameport II up to 5V for a
  653.         second. Connect this one to reset in the SNES). Allowing to
  654.         return to SMC Menu software controlled by patching the
  655.         standart SMC fileheader. See resethandler.i also.
  656.  
  657.         Recall: Please connect PIN 5 of gameport 2 to RESET of the
  658.         ~~~~~~    SNES. RESET can be found at the RESET button. How true!
  659.             Make sure that you don't get ground or pullup! Ground
  660.             should be connected vice your parallel cable, if not
  661.             please connect it also. Work carefully! Don't blast
  662.             your SNES.
  663. ------------------------------------------------------------------------------
  664.  
  665. WARN        prints a warning to stout. Please append warning text after warn.
  666. ~~~~        Also the warnings counter will be increased.
  667. ------------------------------------------------------------------------------
  668.  
  669. SIZE <n>    does nothing, but accepts FASM v0.52 input. The function of
  670. ~~~~        this has been transfered to the HEAP command. Just to make
  671.         some difference to FASM.
  672. ------------------------------------------------------------------------------
  673.  
  674. For the commandline options please type SASM HELP. There're a lot of them....
  675.  
  676. Much fun!
  677.  
  678.     Florian
  679.